package com.tomecode.ora.jdev.ext.showmepassword;

import oracle.ide.Context;
import oracle.ide.controller.ContextMenu;
import oracle.ide.controller.ContextMenuListener;
import oracle.ide.controller.IdeAction;
/**
 * @author Tomas (Tome) Frastia
 * @see http://www.tomecode.com
 */
public class MenuContextMenuListener implements ContextMenuListener {

    public void menuWillShow(ContextMenu contextMenu) {
  
      IdeAction action = IdeAction.find(ShowMePasswordJdevCommand.actionId());
      // Then add it to the context menu.
      contextMenu.add(contextMenu.createMenuItem(action));
    }

    public void menuWillHide(ContextMenu contextMenu) {
    }

    public boolean handleDefaultAction(Context context) {
        return false;
    }
}
